
volatile.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <square>:
#include <stdio.h>

int square(volatile int *ptr)
{
   0:	d10043ff 	sub	sp, sp, #0x10
   4:	f90007e0 	str	x0, [sp, #8]
	return *ptr * *ptr;
   8:	f94007e0 	ldr	x0, [sp, #8]
   c:	b9400001 	ldr	w1, [x0]
  10:	f94007e0 	ldr	x0, [sp, #8]
  14:	b9400000 	ldr	w0, [x0]
  18:	1b007c20 	mul	w0, w1, w0
}
  1c:	910043ff 	add	sp, sp, #0x10
  20:	d65f03c0 	ret

0000000000000024 <square_compile>:

int square_compile(volatile int *ptr)
{
  24:	d10083ff 	sub	sp, sp, #0x20
  28:	f90007e0 	str	x0, [sp, #8]
	int a, b;
	a = *ptr;
  2c:	f94007e0 	ldr	x0, [sp, #8]
  30:	b9400000 	ldr	w0, [x0]
  34:	b9001fe0 	str	w0, [sp, #28]
	b = *ptr;
  38:	f94007e0 	ldr	x0, [sp, #8]
  3c:	b9400000 	ldr	w0, [x0]
  40:	b9001be0 	str	w0, [sp, #24]
	
	return a * b;
  44:	b9401fe1 	ldr	w1, [sp, #28]
  48:	b9401be0 	ldr	w0, [sp, #24]
  4c:	1b007c20 	mul	w0, w1, w0
}
  50:	910083ff 	add	sp, sp, #0x20
  54:	d65f03c0 	ret

0000000000000058 <square_modify>:

int square_modify(volatile int *ptr)
{
  58:	d10083ff 	sub	sp, sp, #0x20
  5c:	f90007e0 	str	x0, [sp, #8]
	int a;
	a = *ptr;
  60:	f94007e0 	ldr	x0, [sp, #8]
  64:	b9400000 	ldr	w0, [x0]
  68:	b9001fe0 	str	w0, [sp, #28]
	
	return a * a;
  6c:	b9401fe1 	ldr	w1, [sp, #28]
  70:	b9401fe0 	ldr	w0, [sp, #28]
  74:	1b007c20 	mul	w0, w1, w0
}
  78:	910083ff 	add	sp, sp, #0x20
  7c:	d65f03c0 	ret

0000000000000080 <main>:

int main()
{
  80:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  84:	910003fd 	mov	x29, sp
	int a = 3;
  88:	52800060 	mov	w0, #0x3                   	// #3
  8c:	b9001ba0 	str	w0, [x29, #24]
	int b;
	
	b = square(&a);
  90:	910063a0 	add	x0, x29, #0x18
  94:	94000000 	bl	0 <square>
  98:	b9001fa0 	str	w0, [x29, #28]
	printf("%d\n", b);
  9c:	90000000 	adrp	x0, 0 <square>
  a0:	91000000 	add	x0, x0, #0x0
  a4:	b9401fa1 	ldr	w1, [x29, #28]
  a8:	94000000 	bl	0 <printf>
	
	b = square_compile(&a);
  ac:	910063a0 	add	x0, x29, #0x18
  b0:	94000000 	bl	24 <square_compile>
  b4:	b9001fa0 	str	w0, [x29, #28]
	printf("%d\n", b);
  b8:	90000000 	adrp	x0, 0 <square>
  bc:	91000000 	add	x0, x0, #0x0
  c0:	b9401fa1 	ldr	w1, [x29, #28]
  c4:	94000000 	bl	0 <printf>
	
	b = square_modify(&a);
  c8:	910063a0 	add	x0, x29, #0x18
  cc:	94000000 	bl	58 <square_modify>
  d0:	b9001fa0 	str	w0, [x29, #28]
	printf("%d\n", b);
  d4:	90000000 	adrp	x0, 0 <square>
  d8:	91000000 	add	x0, x0, #0x0
  dc:	b9401fa1 	ldr	w1, [x29, #28]
  e0:	94000000 	bl	0 <printf>
	
	return 0;
  e4:	52800000 	mov	w0, #0x0                   	// #0
}
  e8:	a8c27bfd 	ldp	x29, x30, [sp], #32
  ec:	d65f03c0 	ret
